import pyautogui

pyautogui.size()  # 获取屏幕尺寸（分辨率×分辨率）

pyautogui.position() # 获取鼠标当前位置

pyautogui.onScreen(100,200) # 判断坐标是否在屏幕范围内

pyautogui.onScreen(100,2000) # 判断坐标是否在屏幕范围内


sizex,sizey=pyautogui.size()

pyautogui.moveTo(sizex/2,sizey/2,duration=1)

pyautogui.moveRel(100, -200, duration=0.5)

pyautogui.click(sizex/2,sizey/2, duration=0.5)

pyautogui.click(button='right')
